package com.thti.mecool.client.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;

public class BootBroadcast extends BroadcastReceiver{
	private boolean isAutoBootLocation;
	@Override
	public void onReceive(Context context, Intent intent) {
		/**
		 * 启动定位服务
		 */
		SharedPreferences load_prf=context.getSharedPreferences("cfg", 0);
		isAutoBootLocation=load_prf.getBoolean("isAutoBootLocation", true);
		if(isAutoBootLocation){
			Intent i=new Intent(context,LocateService.class);
			context.startService(i);
		}
	}
}
